package priv.xp.androidexample.viewmodel

import androidx.lifecycle.ViewModel
import androidx.paging.LivePagedListBuilder
import androidx.paging.PagedList
import priv.xp.androidexample.datasource.GirlPageDataSourceFactory
import priv.xp.androidexample.repository.GirlRepository

class GirlViewModel(girlRepository: GirlRepository = GirlRepository()) : ViewModel() {

    val girls = LivePagedListBuilder(
        GirlPageDataSourceFactory(girlRepository),
        PagedList.Config.Builder()
            .setPageSize(10)
            .setEnablePlaceholders(false)
            .setInitialLoadSizeHint(1)
            .build()
    )
        .build()
}